-
Notifications
You must be signed in to change notification settings - Fork 187
[Edge] Cancel the timer from running when we are done with it #2807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
df4427f to
7625606
Compare
|
@HeikoKlare I don't know how to automate a regression test for this, I assume the existing test cases will cover it sufficiently. |
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the catch, @jonahgraham!
The change sounds totally reasonable to me. I agree that we probably don't need an additional regression test for this. Still, what about just adding a test that basically consists of your snippet from #2806 followed by a control creation to ensure that no "no more handles" error occurs?
I.e., something like:
for (int i = 0; i < 20000; i++) {
browser.setText("Iteration " + i);
new BrowserFunction(browser, "name");
}
new Composite(shell, SWT.NONE);7625606 to
a1fa734
Compare
Done. |
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
Each use of a timer creates a User Object in Windows, and once we have stopped waiting for our desired event we don't need the cancellation tracking anymore. If there are lots of calls to processOSMessagesUntil, such as repeated browser.setText within the MAXIMUM_OPERATION_TIME (5 second) window, we can end up with a huge growth in the number of User Objects, leading to potential `SWTError: No more handles` errors elsewhere in the client code. Fixes eclipse-platform#2806
Each use of a timer creates a User Object in Windows, and once we have stopped waiting for our desired event we don't need the cancellation tracking anymore.
If there are lots of calls to processOSMessagesUntil, such as repeated browser.setText within the MAXIMUM_OPERATION_TIME (5 second) window, we can end up with a huge growth in the number of User Objects, leading to potential
SWTError: No more handleserrors elsewhere in the client code.Fixes #2806